package com.example.droideep.common.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.example.droideep.R;
import com.example.droideep.common.dummydata.Cheeses;

/**
 * @author bri
 * @date 15-4-28.
 */
public class ListDropDownPopup extends DropDownPopup {

    public ListDropDownPopup(Context context) {
        super(LayoutInflater.from(context).inflate(R.layout.layout_popup_drop_down_list_view, null));
    }

    @Override
    public void initViews() {
        ListView listView = findViewById(android.R.id.list);
        listView.setAdapter(new ArrayAdapter<String>(
                mContentView.getContext(),
                android.R.layout.simple_list_item_1,
                android.R.id.text1,
                mContentView.getContext().getResources().getStringArray(R.array.connections)));

        ViewGroup vg = findViewById(R.id.rl_shadow);
        vg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }

    @Override
    public void initEvents() {

    }

    @Override
    public void init() {

    }
}
